/**
 * 
 */
package ccrClasses.layer1.problems;

import java.util.ArrayList;
import java.util.List;

import ccrClasses.CCR;
import ccrClasses.ICcr;

/**
 * @author matheus
 *
 */
public class Problems extends CCR implements ICcr{
	
	public static final String OPEN_TAG = "<Problems>";

	public static final String CLOSE_TAG = "</Problems>";
	
	private List<Problem> problemas;
	
	public Problems() {
		super();
		setProblemas(new ArrayList<Problem>());
	}

	@Override
	public String constructCcrString() {
		String ccr = BASE_OPEN_TAG + BODY_OPEN_TAG + OPEN_TAG;
		for(Problem i: problemas){
			ccr = ccr + i.constructCcrString();
		}
		
		ccr = ccr + CLOSE_TAG + BODY_CLOSE_TAG + BASE_CLOSE_TAG;
		return ccr;
	}

	/**
	 * @param problemas the problemas to set
	 */
	public void setProblemas(List<Problem> problemas) {
		this.problemas = problemas;
	}

	/**
	 * @return the problemas
	 */
	public List<Problem> getProblemas() {
		return problemas;
	}

}
